LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE   := -llog
LOCAL_MODULE := libEVRC_CODEC_ANDROID
EVRC_PATH := $(LOCAL_PATH)/../code

LOCAL_C_INCLUDES += $(EVRC_PATH)/.. \
					$(EVRC_PATH)/../include \
				   $(EVRC_PATH)/../dsp_fx/jni \
			       $(EVRC_PATH)/../dspmath/jni \
			       $(EVRC_PATH)/../ttylib/jni
CODE_FILES := $(wildcard $(EVRC_PATH)/*.c)

THIRD_LIB_DIR := $(LOCAL_PATH)/../3libs
#LOCAL_LDLIBS += $(THIRD_LIB_DIR)/libdmath.a $(THIRD_LIB_DIR)/libdsp40.a $(THIRD_LIB_DIR)/libtty.a
LOCAL_LDLIBS += $(THIRD_LIB_DIR)/libdmath.a  $(THIRD_LIB_DIR)/libtty.a
LOCAL_LDLIBS += -llog

LOCAL_SRC_FILES := ../code/a2lsp.c   ../code/bitpack.c  ../code/comacb.c  ../code/d_fer.c    ../code/encode.c   ../code/getgain.c \
 ../code/intr_cos.c  ../code/pktoav.c    ../code/synfltr.c ../code/acb_ex.c   ../code/bitupack.c \
 ../code/convh.c     ../code/d_globs.c    ../code/fcbgq.c      ../code/getopt.c     \
 ../code/inv_sqrt.c   ../code/maxeloc.c    ../code/pre_enc.c   ../code/w2res.c ../code/acelp_pf.c  \
 ../code/bl_intrp.c   ../code/cshift.c    ../code/d_no_fer.c   ../code/fer.c  ../code/getres.c \
 ../code/lpcana.c     ../code/mdfyorig.c   ../code/putacbc.c   ../code/weight.c ../code/bqiir.c \
 ../code/d3_10pf.c   ../code/d_rate_1.c   ../code/filter.c     ../code/globs.c      ../code/lsp2a.c \
 ../code/mod.c   ../code/rda.c   ../code/zeroinpt.c ../code/apf.c    ../code/c3_10pf.c  ../code/d8_35pf.c \
 ../code/durbin.c     ../code/fndppf.c     ../code/impulser.c   ../code/lspmaq.c     ../code/ns127.c \
 ../code/r_fft.c ../code/auto.c    ../code/c8_35pf.c    ../code/decode.c    ../code/e_globs.c \
 ../code/getext1k.c   ../code/interpol.c   ../code/main.c   ../code/pit_shrp.c   ../code/rom.c ../EVRC_jalg.c


#LOCAL_SRC_FILES += $(THIRD_LIB_DIR)/libdmath.a $(THIRD_LIB_DIR)/libdsp40.a $(THIRD_LIB_DIR)/libtty.a
LOCAL_CFLAGS += -Wall -O3 

include $(BUILD_SHARED_LIBRARY)
